package com.kaishengit.service;

import java.util.List;

import com.kaishengit.dao.ContactDao;
import com.kaishengit.entity.Contact;
import com.kaishengit.util.StringUtil;

public class ContactService {
	
	public ContactDao dao = new ContactDao();
	
	public void save(Contact ct){
		
		ct.setId(StringUtil.getId());
		dao.save(ct);
	}
	
	public List<Contact> findAll(){
		return dao.findAll();
	}
	public  void del(String id){
		dao.del(id);
		
	}
	public Contact findById(String id){
		return dao.findById(id);
		
	}
	public Contact findByName(String name){
		return dao.findByName(name);
	}

	public List<Contact> findByProjectId(String pid) {
		return dao.findByProject(pid);
		
	}

	
}
